import fetch from '@/api'

//盘点计划列表
export function getCheackPlanList(params) {
    return fetch({
        method: 'get',
        url: `/take/page`,
        params,
    })
}

//盘点明细列表
export function getCheackDetailList(planNo,params) {
    return fetch({
        method: 'get',
        url: `/take/detail/page/${planNo}`,
        params,
    })
}

//盘点确认
export function resureCount(data) {
    return fetch({
        method: 'post',
        url: `/take/resure`,
        data
    })
}

//盘点有误确认
export function wrongCount(data) {
    return fetch({
        method: 'post',
        url: `/take/mistake`,
        data
    })
}
//确认
export function addCount(data) {
    return fetch({
        method: 'post',
        url: `/take/create`,
        data
    })
}

//盘点有误物资清单
export function getCheackWrongList(params) {
    return fetch({
        method: 'get',
        url: `/inventory/mis/page`,
        params,
    })
}

//盘点计划明细-有误库存个数
export function getCheackCount(planNo,params) {
    return fetch({
        method: 'get',
        url: `/inventory/get/count/${planNo}`,
        params,
    })
}

// 删除
export function deleteCheackPlan(planNo) {
    return fetch({
        method:'delete',
        url:`/take/${planNo}`
    })
}

//修正库位
export function modRoomLocation(inventoryId,data) {
    return fetch({
        method: 'post',
        url: `/inventory/adjust/roomLocation/${inventoryId}`,
        data
    })
}

